package com.zcx.qshop.dialog;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.zcx.qshop.R;

/**
 * Created by Administrator on 2015/9/19.
 */
public abstract class AlertDialog extends QSDialog {

    public AlertDialog(Context context, String text) {

        super(context);

        setCancelable(false);

        setContentView(R.layout.dialog_location);

        ((TextView)findViewById(R.id.dialog_alert_text)).setText(text);

        findViewById(R.id.dialog_alert_yes).setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {

                dismiss();

                onYes();

            }

        });

    }

    protected abstract void onYes();

}
